<div class="row" ng-controller="bs_book_usedBookList">

    <div class="row">
        <div class=col-md-6>
            <ol class="breadcrumb">
                <li><a ui-sref="book.recommend()">图书主页</a></li>
                <li class="active" ng-bind="getTagFilter() ? getTagFilter() : title"></li>
            </ol>
        </div>
        <div class="col-md-6">
            <div class="btn-toolbar pull-right">
                <div class="btn-group">
                    <button class="btn btn-info" ng-model="sortWay" btn-radio="'attributes.price'">图书价格</button>
                    <button class="btn btn-primary" ng-model="sortWay" btn-radio="'attributes.location'">离我距离</button>
                </div>
                <div class="btn-group">
                    <button class="btn btn-default"
                            ng-if="setTagFilter"
                            ng-class="{'btn-info':getTagFilter()}"
                            ng-click="chooseBookTag()"
                            ng-bind="getTagFilter() ? getTagFilter() : '筛选'">
                    </button>
                    <button class="btn btn-warning" ng-click="setTagFilter(null)"
                            ng-if="getTagFilter()">取消限制
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <h4 ng-bind="getTagFilter() ? getTagFilter() : title"></h4>
            <hr>
        </div>
        <div class="col-md-3" ng-repeat="usedBook in usedBooks | orderBy:sortWay">
            <bs-one-used-book used-book="usedBook" popover-placement="right"></bs-one-used-book>
        </div>
        <bs-infinite-scroll ng-if="hasMore()" on-infinite="loadMore()"></bs-infinite-scroll>
    </div>
</div>